import Vue from 'vue'
import Router from 'vue-router'
import Main from '@/components/Main'
import Home from '@/components/Home'
import WordToPdf from '@/components/WordToPdf'
import WordToOfd from '@/components/WordToOfd'
import PdfToOfd from '@/components/PdfToOfd'
import OfdToPdf from '@/components/OfdToPdf'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Main',
      component: Main,
      redirect: '/home', // 路由重定向
      children: [
          { path: '/home', component: Home },
          { path: '/wordToPdf', component: WordToPdf },
          { path: '/wordToOfd', component: WordToOfd },
          { path: '/pdfToOfd', component: PdfToOfd },
          { path: '/ofdToPdf', component: OfdToPdf },
      ]
    }
  ]
})
